'use strict';

/**
 * @ngdoc directive
 * @name jgappApp.directive:checkExpress
 * @description
 * # checkExpress
 */
angular.module('jgappApp')
    .directive('checkExpress', ["Util", function(Util) {
        return {
            scope: {
                id: "="
            },
            template: '<div class="list-item flex">' +
                '<div class="w30 c9">快递单号:</div>' +
                '<div class="w70 c-succ" ng-click="checkexpress(id)">{{id}}</div></div>',
            restrict: 'AE',
            link: function postLink(scope, element, attrs) {
                scope.checkexpress = function(id) {
                    if (id) {
                        Util.openExpress(id);
                        // window.open(url, '_system', 'location=no');
                    }
                }
            }
        };
    }]);
